GXRasterDataIn
You can override theGXRasterDataIn
message to send data to a raster device for printing. Your override of theGXRasterDataIn
message must match the following formal declaration:
OSErr MyRasterDataIn (gxOffscreenHdl offScreen, gxRectangle *bandRectangle, gxRectangle *dirtyRectangle);
offScreen
- Data representing this portion of the page.
bandRectangle
- A pointer to a rectangle that defines the size and location of the band of data that is being passed in.
dirtyRectangle
- A pointer to a rectangle that defines the area of
bandRectangle
that is occupied by shapes.- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX, in its default implementation of theGXRenderPage
message for raster drivers, sends theGXRasterDataIn
message after rendering a single band of data. The raster driver sends page data to the device in response to this message. Since a page cannot always be rendered as a single bitmap, QuickDraw GX can send this message multiple times for a page.You can override this message to convert the bitmaps sent by QuickDraw GX into a format that is acceptable for your raster device. You can call the
GXBufferData
orGXWriteData
messages to send the data to the device.The default implementation of the
GXRasterDataIn
message breaks the data up into smaller pieces by subdividing the bitmap into "head passes" as defined in the raster package resource. It then sendsGXRasterLineFeed
andGXRasterPackageBitmap
messages to further break down the data and prepare it for the device.SPECIAL CONSIDERATIONS
You never send theGXRasterDataIn
message yourself.You can totally override the
GXRasterDataIn
message, or you can modify the data in some way and then forward the message.If you use the default implementation of the
GXRasterDataIn
message, you must define a raster package ('rpck
') resource.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
The raster package resource is described on page 6-73 in the chapter "Printing Resources."The
GXRenderPage
message is described on page 4-96.The
GXRasterLineFeed
message is described on page 4-98.The
GXRasterPackageBitmap
message is described on page 4-100.The
GXBufferData
message is described on page 4-139.The
GXWriteData
message is described on page 4-141.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help